package GUI;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class TernoutPanle extends JPanel implements ActionListener {
    private ImageIcon imageIcon = Util.getIcon("/img/buttonOff.jpg");
    private JButton menujButton;
    private Text2 frame;
    public TernoutPanle(Text2 frame){
        this.frame = frame;
        this.setLayout(null);
        this.setOpaque(false);

        menujButton = new JButton(imageIcon);
        menujButton.setBounds(690, 250, 100, 50);
        this.add(menujButton);
        menujButton.addActionListener(this);
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == menujButton) {
            frame.switchPanel("menu");
        }
    }
}
